import request from '@/utils/request'

export const DepartmentsAPI = () => {
  return request({
    url: '/company/department'

  })
}
// 新增部门API1
export const NewDepartmentAPI = ({ introduce, manager, code, name, pid }) => {
  return request({
    url: '/company/department',
    method: 'POST',
    data: {
      introduce,
      manager,
      code,
      name,
      pid
    }

  })
}
// 获取员工简单列表
export const EmployeeInformationAPI = () => {
  return request({
    url: '/sys/user/simple'
  })
}
// 修改部门
export const ModifyDepartmentAPI = (data) => {
  return request({
    url: `/company/department/${data.id}`,
    method: 'PUT',
    data
  })
}
// 查询部门详情
export const QueryDepartmentAPI = (id) => {
  return request({
    url: `/company/department/${id}`

  })
}
// 删除部门
export const removeDepartmentAPI = (id) => {
  return request({
    url: `/company/department/${id}`,
    method: 'DELETE'
  })
}
